pkgname=qt5-qtsensors
pkgver=5.9.3
pkgrel=0
arch="all"
url='http://qt-project.org/'
license="GPL3 LGPL3 FDL custom"
pkgdesc='Provides APIs for sensors'
depends="qt5-qtbase"
makedepends="qt5-qtbase-dev"
source="http://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/submodules/${pkgname/qt5-/}-opensource-src-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc"
builddir="$srcdir/${pkgname/qt5-/}-opensource-src-$pkgver"

build() {
	cd "$builddir"
	qmake-qt5
	make
}

package() {
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir" install

	# Drop QMAKE_PRL_BUILD_DIR because reference the build dir
	find "$pkgdir/usr/lib" -type f -name '*.prl' \
		-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;

	install -d "$pkgdir"/usr/share/licenses
	ln -s /usr/share/licenses/qt5-base "$pkgdir"/usr/share/licenses/${pkgname}
}
sha512sums="848184de2c914c0240f3ecffe96ab267fb24693d16a55c1c757d83af9f282bc6f6c5cd762cb42fc389bc02e301c21a6da7b178260f534db35f0abe277f638ea9  qtsensors-opensource-src-5.9.3.tar.xz"
